package com.material.pound.mapper;

import java.util.Date;
import java.util.List;

import com.material.pound.FuelPoundParams;
import com.material.pound.domain.FuelPound;
import com.material.pound.params.FuelPoundQuery;
import com.material.pound.params.FuelPoundQueryParams;
import com.material.pound.params.FuelPoundSettleParams;
import com.material.pound.vo.FuelDiaryVo;
import com.material.pound.vo.FuelPoundSettleVo;
import org.apache.ibatis.annotations.Param;

/**
 * 磅单信息Mapper接口
 * 
 * @author ruoyi
 * @date 2025-05-07
 */
public interface FuelPoundMapper 
{
    /**
     * 查询磅单信息
     * 
     * @param id 磅单信息主键
     * @return 磅单信息
     */
    public FuelPound selectFuelPoundById(Long id);

    /**
     * 查询磅单信息列表
     * 
     * @param fuelPound 磅单信息
     * @return 磅单信息集合
     */
    public List<FuelPound> selectFuelPoundList(FuelPound fuelPound);

    /**
     * 新增磅单信息
     * 
     * @param fuelPound 磅单信息
     * @return 结果
     */
    public int insertFuelPound(FuelPound fuelPound);

    /**
     * 修改磅单信息
     * 
     * @param fuelPound 磅单信息
     * @return 结果
     */
    public int updateFuelPound(FuelPound fuelPound);

    /**
     * 删除磅单信息
     * 
     * @param id 磅单信息主键
     * @return 结果
     */
    public int deleteFuelPoundById(Long id);

    /**
     * 批量删除磅单信息
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteFuelPoundByIds(Long[] ids);

    /**
     * 通过车辆查询
     * @param carId
     * @param reservationDate
     * @return
     */
    FuelPound selectFuelPoundByCarId(@Param("carId") Long carId, @Param("reservationDate") String reservationDate);

    /**
     * 按日期查询日报
     * @param fuelPoundParams
     * @return
     */
    List<FuelDiaryVo> selectFuelPoundByDate(FuelPoundParams fuelPoundParams);

    /**
     * 按燃料名查询日报
     * @param fuelPoundParams
     * @return
     */
    List<FuelDiaryVo> selectFuelPoundByFuel(FuelPoundParams fuelPoundParams);

    /**
     * 按车辆查询日报
     * @param fuelPoundParams
     * @return
     */
    List<FuelDiaryVo> selectFuelPoundByCar(FuelPoundParams fuelPoundParams);

    /**
     * 按供应商查询日报
     * @param fuelPoundParams
     * @return
     */
    List<FuelDiaryVo> selectFuelPoundBySupplier(FuelPoundParams fuelPoundParams);

    /**
     * 结算列表
     * @param fuelPound
     * @return
     */
    List<FuelPound> selectFuelPoundSettleList(FuelPoundQuery fuelPound);

    /**
     * 查询是否存在磅单信息
     * @param reservationDate
     * @param supplierName
     * @param carNum
     * @return
     */
    FuelPound selectFuelPoundInfo(@Param("reservationDate") String reservationDate, @Param("supplierName")String supplierName, @Param("carNum")String carNum);

    /**
     * 批量更新
     * @param fuelPounds
     */
    void batchUpdateFuelPound(List<FuelPound> fuelPounds);

    /**
     * 结算查询
     * @param query
     * @return
     */
    FuelPoundSettleVo selectFuelSettleInfo(FuelPoundSettleParams query);

    /**
     * 查询列表
     * @param fuelPound
     * @return
     */
    List<FuelPound> selectFuelPoundPageList(FuelPoundQueryParams fuelPound);
}
